import { getList } from '../api'

export const getProducts = () => dispatch => {
    getList()
        .then(res => {
            console.log(res)
            dispatch({
                type: "GET_PRODUCTS",
                payload: res.data.result
            })
        })
}